<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="utf-8">
  
  <title>‎ | gdme1320 的笔记</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="Table of Contents   Deploy our app :: kubectl run  Deployments Example   View our app Using Service to Expose Your App  kubectl expose type   Scale Your App Updating Your App  Update Rollout   Pod">
<meta property="og:type" content="article">
<meta property="og:title" content="‎">
<meta property="og:url" content="http://gdme1320.gitee.com/devops/kubectl/index.html">
<meta property="og:site_name" content="gdme1320 的笔记">
<meta property="og:description" content="Table of Contents   Deploy our app :: kubectl run  Deployments Example   View our app Using Service to Expose Your App  kubectl expose type   Scale Your App Updating Your App  Update Rollout   Pod">
<meta property="og:locale" content="default">
<meta property="og:updated_time" content="2022-03-23T09:59:06.470Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="‎">
<meta name="twitter:description" content="Table of Contents   Deploy our app :: kubectl run  Deployments Example   View our app Using Service to Expose Your App  kubectl expose type   Scale Your App Updating Your App  Update Rollout   Pod">
  
    <link rel="alternate" href="/atom.xml" title="gdme1320 的笔记" type="application/atom+xml">
  
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" integrity="sha384-XdYbMnZ/QjLh6iI4ogqCTaIjrFk87ip+ekIjefZch0Y+PvJ8CDYtEs1ipDmPorQ+" crossorigin="anonymous">

  <link rel="stylesheet" href="/css/styles.css">
  <link rel="stylesheet" href="/css/docs.min.css">
  

</head>
</html>
<body>
  <nav class="navbar navbar-inverse">
  <div class="container">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-menu-navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="main-menu-navbar">
      <ul class="nav navbar-nav">
        
          <li><a class href="/index.html">Home</a></li>
        
          <li><a class href="/archives/">Archives</a></li>
        
      </ul>

      <!--
      <ul class="nav navbar-nav navbar-right">
        
          <li><a href="/atom.xml" title="RSS Feed"><i class="fa fa-rss"></i></a></li>
        
      </ul>
      -->
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>

  <div class="container bs-docs-container">
  
    <div class="row">
        <div class="col-sm-8 blog-main">
          <article id="post-devops/kubectl" class="article article-type-post" itemscope itemprop="blogPost">

  <header class="article-header">
    
  
    <h1 class="article-title" itemprop="name">
      ‎
    </h1>
  


  </header>

  <div class="article-meta">
    <div class="article-datetime">
  <a href="/devops/kubectl/" class="article-date"><time datetime="2022-03-23T09:59:06.470Z" itemprop="datePublished">2022-03-23</time></a>
</div>

    
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/devops/">devops</a>
  </div>


  </div>
  <div class="article-inner">

    <div class="article-entry" itemprop="articleBody">
      
        
<div id="content">
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgc5eac4b">Deploy our app :: kubectl run</a>
<ul>
<li><a href="#org0c3cb0e">Deployments</a></li>
<li><a href="#org532b3b1">Example</a></li>
</ul>
</li>
<li><a href="#org47b3483">View our app</a></li>
<li><a href="#org42af144">Using Service to Expose Your App</a>
<ul>
<li><a href="#orgf91d947">kubectl expose</a></li>
<li><a href="#org7c9fff7">type</a></li>
</ul>
</li>
<li><a href="#org64781d8">Scale Your App</a></li>
<li><a href="#org33c1554">Updating Your App</a>
<ul>
<li><a href="#org8d54461">Update</a></li>
<li><a href="#orge6d3bff">Rollout</a></li>
</ul>
</li>
<li><a href="#orgdae2add">Pod Operation</a>
<ul>
<li><a href="#orgc934f03">Get Pods :: kubectl get pods</a></li>
<li><a href="#org168c651">Show Pods :: kubectl describe pods</a></li>
<li><a href="#org3e56fe9">Show Pods Log :: kubectl logs $POD_NAME</a></li>
<li><a href="#orgdf32307">在容器中执行命令</a></li>
</ul>
</li>
<li><a href="#orgfba9d28">Service Operations</a>
<ul>
<li><a href="#orge992576">Get Service :: kubectl get services</a></li>
<li><a href="#orgd7adba0">Delete Service</a></li>
</ul>
</li>
<li><a href="#org427f352">Label Operations</a>
<ul>
<li><a href="#orgbbe6933">Get by Label</a></li>
<li><a href="#org4028a9d">Apply New Label</a></li>
</ul>
</li>
<li><a href="#org4dbacbc">Namespaces Operations</a>
<ul>
<li><a href="#org1aac8e7">Get Namespaces :: kubectl get namespaces</a></li>
<li><a href="#org8d0ab64">Create Namespace ::</a></li>
<li><a href="#org4891c9a">Delete Namespace :: kubectl delete namespaces &lt;name&gt;</a></li>
</ul>
</li>
</ul>
</div>
</div>
<p>
The common format of a kubectl command is: kubectl action resource.
</p>
<p>
To view the nodes in the cluster, run the kubectl get nodes command
</p>
<div class="outline-2" id="outline-container-orgc5eac4b">
<h2 id="orgc5eac4b">Deploy our app :: kubectl run</h2>
<div class="outline-text-2" id="text-orgc5eac4b">
<p>
kubectl run NAME –image=image [–env="key=value"] [–port=port] [–replicas=replicas] [–dry-run=bool]
[–overrides=inline-json] [–command] – [COMMAND] [args…] [options]
</p>
</div>
<div class="outline-3" id="outline-container-org0c3cb0e">
<h3 id="org0c3cb0e">Deployments</h3>
<div class="outline-text-3" id="text-org0c3cb0e">
<p>
Kubernates 中的 Deployment, 在图中位于master node中。
Deployment指示Kubernates如何创建和更新应用程序。
一旦创建完成，Kubernate Master将安排应用程序到集群中的结点（运行实例）。
</p>
<p>
当应用程序的实例启动后，Kubernate Deployment Controller一直监控这些实例，
如果运行一个实例的Node挂了或者被删除了，Deployment Controller使用集群中另外一个Node上的实例来替换它。
这种方式提供了自愈的机制。
<object class="org-svg" data="./.kubectl/deployment.svg" type="image/svg+xml">
Sorry, your browser does not support SVG.</object>
</p>
</div>
</div>
<div class="outline-3" id="outline-container-org532b3b1">
<h3 id="org532b3b1">Example</h3>
<div class="outline-text-3" id="text-org532b3b1">
<p>
The  run  command creates a new deployment.For example:
</p>
<div class="org-src-container">
<pre class="src src-sh">kubectl run kubernetes-bootcamp --image=gcr.io/google-samples/kubernetes-bootcamp:v1 --port=8080
</pre>
</div>
<p>
这条命令执行如下操作：
</p>
<ol class="org-ol">
<li>查找能启动此程序实例的合适Node</li>
<li>安排程序到这个Node上运行</li>
<li>配置集群，当需要时重新分配应用实例到新的Node上</li>
</ol>
<p>
list your deployment:  kubectl get deployments 
</p>
</div>
</div>
</div>
<div class="outline-2" id="outline-container-org47b3483">
<h2 id="org47b3483">View our app</h2>
<div class="outline-text-2" id="text-org47b3483">
<p>
kubernates 中运行的pod是位于私有的孤立的网络中。默认情况下，只有同一个kubernates集群中的其他pods和service能访问。
当我们使用kubectl的时候，我们是通过API终结点与我们的应用程序交互的。
</p>
<p>
kubectl能够创建一个代理，与内部的私有网络交互。
</p>
<p>
下面这个命令会阻塞当前shell，所以在新的窗口中打开。通过 ctrl-c 停止，并且运行时不会输出任何信息。
</p>
<div class="org-src-container">
<pre class="src src-sh">kubectl proxy
</pre>
</div>
<p>
这样就建立了一个主机到Kubernates集群之间的连接。然后通过下面的命令访问pod：
</p>
<div class="org-src-container">
<pre class="src src-sh"><span style="font-weight: bold; font-style: italic;"># </span><span style="font-weight: bold; font-style: italic;">Deploy nginx and expose 80</span>
kubectl run nginx --image nginx --port 80
<span style="font-weight: bold; font-style: italic;"># </span><span style="font-weight: bold; font-style: italic;">kubectl proxy # 在另外的shell中运行的命令，建立主机到kubernates集群之间的连接</span>
<span style="font-weight: bold; font-style: italic;"># </span><span style="font-weight: bold; font-style: italic;">访问nginx</span>
curl http://localhost:8001/api/v1/namespaces/test/pods/nginx-57867cc648-9pqfv/proxy/
<span style="font-weight: bold; font-style: italic;">## </span><span style="font-weight: bold; font-style: italic;">OUTPUT: Nginx服务器欢迎页 html 内容</span>
</pre>
</div>
</div>
</div>
<div class="outline-2" id="outline-container-org42af144">
<h2 id="org42af144">Using Service to Expose Your App</h2>
<div class="outline-text-2" id="text-org42af144">
<p>
Pod随着Node的消亡而结束其生命周期。
Service是一层抽象，定义pod的逻辑集合，和访问它们的策略。
通过yaml（推荐）或JSON定义Service
</p>
<div class="org-src-container">
<pre class="src src-sh">kubectl expose deployment nginx --type=LoadBalancer --port=10080 --target-port=80
</pre>
</div>
</div>
<div class="outline-3" id="outline-container-orgf91d947">
<h3 id="orgf91d947">kubectl expose</h3>
</div>
<div class="outline-3" id="outline-container-org7c9fff7">
<h3 id="org7c9fff7">type</h3>
<div class="outline-text-3" id="text-org7c9fff7">
<dl class="org-dl">
<dt>ClusterIP</dt><dd>default, 自动分配一个仅 cluster 内部可以访问的虚拟 IP</dd>
<dt>NodePort</dt><dd>在ClusterIP的基础上，使用NAT，在集群上的每个Node上使用相同的端口，集群外部能够使用 &lt;NodeIP&gt;:&lt;NodePort&gt;的方式访问服务</dd>
<dt>LoadBalancer</dt><dd>在NodePort的基础上，借助cloud provider（云服务提供商）创建一个LoadBalancer，使用一个固定的外部IP</dd>
<dt>ExternalName</dt><dd>使用spec中指定的externalName作为名字，返回该名字的CNAME记录。没有代理。需要1.7或以上的kube-dns</dd>
</dl>
</div>
</div>
</div>
<div class="outline-2" id="outline-container-org64781d8">
<h2 id="org64781d8">Scale Your App</h2>
<div class="outline-text-2" id="text-org64781d8">
<div class="org-src-container">
<pre class="src src-sh">kubectl scale deployments/kubernetes-bootcamp --replicas=4 <span style="font-weight: bold; font-style: italic;"># </span><span style="font-weight: bold; font-style: italic;">扩展成4个，再次 kubectl get pods 能看到有4个ip不同的nginx</span>
</pre>
</div>
</div>
</div>
<div class="outline-2" id="outline-container-org33c1554">
<h2 id="org33c1554">Updating Your App</h2>
<div class="outline-text-2" id="text-org33c1554">
</div>
<div class="outline-3" id="outline-container-org8d54461">
<h3 id="org8d54461">Update</h3>
<div class="outline-text-3" id="text-org8d54461">
<p>
kubectl set image (-f FILENAME | TYPE NAME) CONTAINER_NAME_1=CONTAINER_IMAGE_1… CONTAINER_NAME_N=CONTAINER_IMAGE_N [options]
</p>
<div class="org-src-container">
<pre class="src src-sh">kubectl set image deployments/kubernetes-bootcamp kubernetes-bootcamp=jocatalin/kubernetes-bootcamp:v2
</pre>
</div>
</div>
</div>
<div class="outline-3" id="outline-container-orge6d3bff">
<h3 id="orge6d3bff">Rollout</h3>
<div class="outline-text-3" id="text-orge6d3bff">
<p>
kubectl rollout undo deployments/nginx
</p>
</div>
</div>
</div>
<div class="outline-2" id="outline-container-orgdae2add">
<h2 id="orgdae2add">Pod Operation</h2>
<div class="outline-text-2" id="text-orgdae2add">
</div>
<div class="outline-3" id="outline-container-orgc934f03">
<h3 id="orgc934f03">Get Pods :: kubectl get pods</h3>
</div>
<div class="outline-3" id="outline-container-org168c651">
<h3 id="org168c651">Show Pods :: kubectl describe pods</h3>
</div>
<div class="outline-3" id="outline-container-org3e56fe9">
<h3 id="org3e56fe9">Show Pods Log :: kubectl logs $POD_NAME</h3>
<div class="outline-text-3" id="text-org3e56fe9">
<div class="org-src-container">
<pre class="src src-sh"><span style="font-weight: bold;">export</span> <span style="font-weight: bold; font-style: italic;">POD_NAME</span>=$(<span style="font-weight: bold;">kubectl</span> get pods -o go-template --template <span style="font-style: italic;"> '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' </span>)
<span style="font-weight: bold;">echo</span> Name of the Pod: $<span style="font-weight: bold; font-style: italic;">POD_NAME</span>
</pre>
</div>
</div>
</div>
<div class="outline-3" id="outline-container-orgdf32307">
<h3 id="orgdf32307">在容器中执行命令</h3>
<div class="outline-text-3" id="text-orgdf32307">
<p>
当pod运行之后，能够直接在在容器中运行命令
 kubectl exec $POD_NAME env 
因为pod中只有一个容器，所以容器的名字能够忽略，例如，运行bash：
</p>
<div class="org-src-container">
<pre class="src src-sh">kubectl exec -ti $<span style="font-weight: bold; font-style: italic;">POD_NAME</span> bash
</pre>
</div>
</div>
</div>
</div>
<div class="outline-2" id="outline-container-orgfba9d28">
<h2 id="orgfba9d28">Service Operations</h2>
<div class="outline-text-2" id="text-orgfba9d28">
</div>
<div class="outline-3" id="outline-container-orge992576">
<h3 id="orge992576">Get Service :: kubectl get services</h3>
</div>
<div class="outline-3" id="outline-container-orgd7adba0">
<h3 id="orgd7adba0">Delete Service</h3>
<div class="outline-text-3" id="text-orgd7adba0">
<pre class="example">
kubectl delete service nginx
kubectl delete service -l run=nginx # delete by label
</pre>
</div>
</div>
</div>
<div class="outline-2" id="outline-container-org427f352">
<h2 id="org427f352">Label Operations</h2>
<div class="outline-text-2" id="text-org427f352">
</div>
<div class="outline-3" id="outline-container-orgbbe6933">
<h3 id="orgbbe6933">Get by Label</h3>
<div class="outline-text-3" id="text-orgbbe6933">
<p>
kubectl describe deployment能够看到其中的label，
根据label进行筛选：
</p>
<pre class="example">
kubectl get pods -l run=nginx 
kubectl get services -l run=nginx
</pre>
</div>
</div>
<div class="outline-3" id="outline-container-org4028a9d">
<h3 id="org4028a9d">Apply New Label</h3>
<div class="outline-text-3" id="text-org4028a9d">
<p>
kubectl label pod $POD_NAME app=v1
</p>
</div>
</div>
</div>
<div class="outline-2" id="outline-container-org4dbacbc">
<h2 id="org4dbacbc">Namespaces Operations</h2>
<div class="outline-text-2" id="text-org4dbacbc">
<p>
kubectl可以通过–namespace或者-n选项指定namespace。如果不指定，默认为default。
通过设置–all-namespace=true来查看所有namespace下的资源。
</p>
<p>
通过  kubectl config set-context &lt;context_name&gt; --namespace=&lt;namespace&gt;  设置context的默认namespce
</p>
</div>
<div class="outline-3" id="outline-container-org1aac8e7">
<h3 id="org1aac8e7">Get Namespaces :: kubectl get namespaces</h3>
<div class="outline-text-3" id="text-org1aac8e7">
<div class="org-src-container">
<pre class="src src-sh">$ kubectl get namespaces
<span style="font-weight: bold; font-style: italic;">## </span><span style="font-weight: bold; font-style: italic;">OUTPUT</span>
NAME          STATUS   AGE
default       Active   19d
kube-public   Active   19d
kube-system   Active   19d
sre           Active   9d
</pre>
</div>
<p>
STATUS包含两种状态：Active, Terminated（在namspace删除的过程中）
</p>
</div>
</div>
<div class="outline-3" id="outline-container-org8d0ab64">
<h3 id="org8d0ab64">Create Namespace ::</h3>
<div class="outline-text-3" id="text-org8d0ab64">
<ul class="org-ul">
<li>Create using command line:  kubectl create namespace &lt;name&gt; </li>
<li>Create from file:  kubectl create -f &lt;file_path&gt; </li>
</ul>
<div class="org-src-container">
<pre class="src src-ymal">apiVersion: v1
kind: Namespace
metadata:
  name: new-namespace
</pre>
</div>
<div class="org-src-container">
<pre class="src src-sh">$ kubectl create -f ./my-namespace.yaml
</pre>
</div>
</div>
</div>
<div class="outline-3" id="outline-container-org4891c9a">
<h3 id="org4891c9a">Delete Namespace :: kubectl delete namespaces &lt;name&gt;</h3>
<div class="outline-text-3" id="text-org4891c9a">
<p>
Attentions:
</p>
<ul class="org-ul">
<li>删除Namespace会删除所有属于该Namespace下的资源</li>
<li>Can NOT delete 'default' and 'kube-system'</li>
</ul>
</div>
</div>
</div>
</div>
<div class="status" id="postamble">
<p class="author">Author: amo</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer" target="_blank" rel="noopener">Validate</a></p>
</div>

      
    </div>

    
      

    

    <footer class="article-footer">
      <a data-url="http://gdme1320.gitee.com/devops/kubectl/" data-id="cl13eo7jp007whjv4v5ou7zid" class="article-share-link">
        <i class="fa fa-share"></i> Share
      </a>
      
      

    </footer>
  </div>
  
    
<ul id="article-nav" class="nav nav-pills nav-justified">
  
  <li role="presentation">
    <a href="/lisp/index/" id="article-nav-older" class="article-nav-link-wrap">
      <i class="fa fa-chevron-left pull-left"></i>
      <span class="article-nav-link-title">Lisp笔记</span>
    </a>
  </li>
  
  
  <li role="presentation">
    <a href="/devops/kubernates/" id="article-nav-newer" class="article-nav-link-wrap">
      <span class="article-nav-link-title">‎</span>
      <i class="fa fa-chevron-right pull-right"></i>
    </a>
  </li>
  
</ul>


  
</article>




        </div>
        <div class="col-sm-3 col-sm-offset-1 blog-sidebar">
          
  
  <div class="sidebar-module">
    <h4>Categories</h4>
    <ul class="sidebar-module-list"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/apps/">apps</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/architecture/">architecture</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/devops/">devops</a><span class="sidebar-module-list-count">10</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/devops/kubectl/">kubectl</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/devops/kubernetes/">kubernetes</a><span class="sidebar-module-list-count">3</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/dotnet/">dotnet</a><span class="sidebar-module-list-count">3</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/dotnet/entityframework/">entityframework</a><span class="sidebar-module-list-count">1</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/elasticsearch/">elasticsearch</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/emacs/">emacs</a><span class="sidebar-module-list-count">4</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/emacs/org-mode/">org-mode</a><span class="sidebar-module-list-count">3</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/git/">git</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/graphql/">graphql</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/groovy/">groovy</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/">java</a><span class="sidebar-module-list-count">52</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/concurrent/">concurrent</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/jackson/">jackson</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/shiro/">shiro</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/spring/">spring</a><span class="sidebar-module-list-count">11</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/spring-amqp/">spring-amqp</a><span class="sidebar-module-list-count">5</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/spring-amqp/spring-jpa/">spring-jpa</a><span class="sidebar-module-list-count">1</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/spring-jpa/">spring-jpa</a><span class="sidebar-module-list-count">10</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/spring-security/">spring-security</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/thymeleaf/">thymeleaf</a><span class="sidebar-module-list-count">2</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/thymeleaf/maven/">maven</a><span class="sidebar-module-list-count">1</span></li></ul></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/jenkins/">jenkins</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/journal/">journal</a><span class="sidebar-module-list-count">7</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/js/">js</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/">linux</a><span class="sidebar-module-list-count">35</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/kde/">kde</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/kross/">kross</a><span class="sidebar-module-list-count">3</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/kross/ktorrent-scripts/">ktorrent-scripts</a><span class="sidebar-module-list-count">1</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/shell/">shell</a><span class="sidebar-module-list-count">6</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/tcp/">tcp</a><span class="sidebar-module-list-count">1</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/lisp/">lisp</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/mongodb/">mongodb</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/mssql/">mssql</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/mysql/">mysql</a><span class="sidebar-module-list-count">12</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/nginx/">nginx</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/node/">node</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/postgresql/">postgresql</a><span class="sidebar-module-list-count">2</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/postgresql/client/">client</a><span class="sidebar-module-list-count">1</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/python/">python</a><span class="sidebar-module-list-count">19</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/regex/">regex</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/rfc/">rfc</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/vim/">vim</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/windows/">windows</a><span class="sidebar-module-list-count">7</span></li></ul>
  </div>



  
  <div class="sidebar-module">
    <h4>Tags</h4>
    <ul class="sidebar-module-list"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/ReentrantLock/">ReentrantLock</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/nohup/">nohup</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/pandoc/">pandoc</a><span class="sidebar-module-list-count">1</span></li></ul>
  </div>



  
  <div class="sidebar-module">
    <h4>Tag Cloud</h4>
    <p class="tagcloud">
      <a href="/tags/ReentrantLock/" style="font-size: 10px;">ReentrantLock</a> <a href="/tags/nohup/" style="font-size: 10px;">nohup</a> <a href="/tags/pandoc/" style="font-size: 10px;">pandoc</a>
    </p>
  </div>


  
  <div class="sidebar-module">
    <h4>Archives</h4>
    <ul class="sidebar-module-list"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2919/06/">June 2919</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2022/03/">March 2022</a><span class="sidebar-module-list-count">58</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2022/01/">January 2022</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/11/">November 2021</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/10/">October 2021</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/04/">April 2021</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/03/">March 2021</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/02/">February 2021</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/01/">January 2021</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/12/">December 2020</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/11/">November 2020</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/10/">October 2020</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/09/">September 2020</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/07/">July 2020</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/06/">June 2020</a><span class="sidebar-module-list-count">10</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/04/">April 2020</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/03/">March 2020</a><span class="sidebar-module-list-count">8</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/02/">February 2020</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/01/">January 2020</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/12/">December 2019</a><span class="sidebar-module-list-count">7</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/11/">November 2019</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/10/">October 2019</a><span class="sidebar-module-list-count">11</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/09/">September 2019</a><span class="sidebar-module-list-count">6</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/08/">August 2019</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/07/">July 2019</a><span class="sidebar-module-list-count">10</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/06/">June 2019</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/05/">May 2019</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/04/">April 2019</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/03/">March 2019</a><span class="sidebar-module-list-count">8</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/02/">February 2019</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/01/">January 2019</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/11/">November 2018</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/10/">October 2018</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/08/">August 2018</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/07/">July 2018</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/06/">June 2018</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/03/">March 2018</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2017/07/">July 2017</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2017/06/">June 2017</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2017/04/">April 2017</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2015/05/">May 2015</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/1970/01/">January 1970</a><span class="sidebar-module-list-count">9</span></li></ul>
  </div>



  
  <div class="sidebar-module">
    <h4>Recents</h4>
    <ul class="sidebar-module-list">
      
        <li>
          <a href="/java/acessing-generic-types-at-runtime/">获取泛型类型</a>
        </li>
      
        <li>
          <a href="/linux/shell/bash_cgi/">Script for Shell Parsing Parameters</a>
        </li>
      
        <li>
          <a href="/linux/shell/shell-script/">Shell Script Getting Start</a>
        </li>
      
        <li>
          <a href="/linux/tcp/network-tcp-performance-turning-with-sysctl/">【翻译】Sysctl调节Linux网络性能</a>
        </li>
      
        <li>
          <a href="/java/concurrent/aqs-src/">AQS源码笔记</a>
        </li>
      
    </ul>
  </div>



        </div>
    </div>
  </div>
  <footer class="blog-footer">
  <div class="container">
    <div id="footer-info" class="inner">
      &copy; 2022 gdme1320<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

  

<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" integrity="sha384-8gBf6Y4YYq7Jx97PIqmTwLPin4hxIzQw5aDmUg/DDhul9fFpbbLcLh3nTIIDJKhx" crossorigin="anonymous"></script> -->

<script src="/js/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>



<script src="/js/script.js"></script>

</body>
</html>
